-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cellular dns test with IAR compiled binary #11220
Conversation
Test case printed IP address. If ip address is null, IAR compiled binary fails. Added check for printing null. If IP address is null, then it prints string 'null'.
84bb815
to
2ebc648
Compare
// no IPV4 address, return | ||
return NULL; | ||
} | ||
len = _at.read_string(_ip, NSAPI_IPv4_SIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PDP_IPV6_SIZE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, fixed
// in case stack type is not IPV4 only, try to look also for IPV6 address | ||
if (_stack_type != IPV4_STACK) { | ||
if (len != -1 && _stack_type != IPV4_STACK) { | ||
// in case stack type is not IPV4 only, try to look also for IPV6 address | ||
(void)_at.read_string(_ip, PDP_IPV6_SIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, can't do that as this is an optional value
CellularContext now tries to get an IP address after connect and before sending NSAPI_STATUS_GLOBAL_UP. Even if we don't the IP address from the modem we will send NSAPI_STATUS_GLOBAL_UP and return success. Modem has an ip address but for some reason some modems don't give it to us.
2ebc648
to
6a17d74
Compare
// in case stack type is not IPV4 only, try to look also for IPV6 address | ||
if (_stack_type != IPV4_STACK) { | ||
if (len != -1 && _stack_type != IPV4_STACK) { | ||
// in case stack type is not IPV4 only, try to look also for IPV6 address | ||
(void)_at.read_string(_ip, PDP_IPV6_SIZE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, can't do that as this is an optional value
Test case printed IP address. If ip address is null, IAR compiled binary fails. Added check for printing null. If IP address is null, then it prints string 'null'.
CI started |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
restarted |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Sitting on top of 5.14 changes so targeting for 5.14 now instead |
Description
Binary compiled with IAR crashes when trying to print null string. Fixed to print 'null' when the dns test is trying to print an empty ip address.
Fixed also that there should not be an empty ip address after connect. After fix, still some modems don't give an ip address even they have it. This can't be fixed but network communication works properly.
Pull request type
Reviewers
@kivaisan @kimlep01